Initialize DB with migration#11
Conversation
|
I'm stuck because am unable to create a unique index. <index>
<name>cg_uri_index</name>
<unique>true</unique>
<field>
<name>uri</name>
<sorting>ascending</sorting>
</field>
</index>Now with Doctrine I define it as: $table->addUniqueIndex(['uri'], 'cg_uri_index');But MySQL is not happy: This says that MySQL requires an explicit key length, basically how many of first characters of the field must be indexed: http://stackoverflow.com/a/1827118 However Doctrine doesn't allow you to pass a length for indices: doctrine/orm#3553 (won't fix as too DB specific) I was told on IRC to try with varchar, let's find out how to do that... |
|
Note that in the MDB2 schema the "uri" column was specified as having the type "text" which is somehow mapped to "TINYTEXT" |
|
I changed the column type from "text" to "string" and now the index can be created properly. It is now possible to enable this app and get the initial DB ! @DeepDiver1975 @VicDeo @jvillafanez please review |
|
btw, requires owncloud/core#14851 checked out on master for it to work |
|
👍 |
Fixes #10